package com.wty.basic.changliangPool;

import java.util.concurrent.CountDownLatch;

public class StringTest {
    public static void main(String args[]) throws InterruptedException {
        CountDownLatch countDownLatch=new CountDownLatch(1);

        String s1="hello";
        String s2="he"+"llo";
        String s3=new String("hello");


        System.out.println(s1==s2);
        System.out.println(s1==s3);
        System.out.println(s1==s3.intern());

        String s4=new String("aaa");
        String s5=new String("aaa");
        System.out.println(s4==s5);
        System.out.println(s4.intern()==s5.intern());
        countDownLatch.await();
    }



}
